//
//  ITUserInfo.m
//  InTubePro
//
//  Created by seven on 2019/12/25.
//  Copyright © 2019 seven. All rights reserved.
//

#import "ITUserInfo.h"

@implementation ITUserInfo

//+ (NSDictionary *)modelCustomPropertyMapper {
//    return @{
//             @"memberId": @"id",
//             @"isNewer": @"newer",
//             };
//}


+ (NSDictionary *)modelContainerPropertyGenericClass {
    // value使用[YYEatModel class]或YYEatModel.class或@"YYEatModel"没有区别
    return @{};
}


// 如果实现了该方法，则处理过程中会忽略该列表内的所有属性
+ (NSArray *)modelPropertyBlacklist {
    return @[@"account1"];
}

-(instancetype)initWithDictionary:(NSDictionary *)dic{
    self = [super init];
    if (self) {
        [self modelSetWithDictionary:dic];
    }
    return self;
}

/**
 将用户对象转义成字典
 
 @return 用户信息字典
 */
-(NSDictionary *)dictionaryInfo
{
    NSMutableDictionary *dic = [self modelToJSONObject];
    return dic;
}


+ (NSString *)genderStringWithType:(SexType)type{
    NSString *string = @"";
    switch (type) {
        case SexMale:
            string = @"Male";
            break;
        case SexFemale:
            string = @"Female";
            break;
        case SexSecret:
            string = @"Prefer Not to Say";
            break;
        case SexNonBinary:
            string = @"Non-Binary";
            break;
        default:
            break;
    }
    return string;
}

- (BOOL)isGuest{
//    if (_status == 0) {
//        return YES;
//    }
    if ([_source isEqualToString:@"guest"]) {
        return YES;
    }
    return NO;
}

-(BOOL)isCompleteBodyData
{
    return (self.age > 0 && self.weight > 0 && self.height > 0);
}
@end
